In the last video we have localized our stock price time series to New York time.
So here we can see that New York Time is a four hours behind UTC time and we can also check this here
with the index attribute tea set.
So this is New York time.
And let's assume that you want to convert these New York Times to L.A. time because we are located in
L.A. and frequently trade in the cheese stock or whatever.
And actually we can convert two other time zones with the method the tea set convert and it's actually
required that we have localized our time series before.
So if you haven't localized that we cannot convert it.
So first of all we can convert our New York Time to UTC bypassing here UTC
and here we have the corresponding UTC time so 10:00 a.m. New York is uh 2:00 p.m. UTC time and also
here we have the difference to UTC time and of course that's uh 0 and let's convert our New York Time
to Los ángeles time bypassing America Los Angeles so apparently Los Angeles Times.
Three hours behind the New York time and seven hours behind UTC time.
So 10:00 a.m. New York is actually corresponding to a 7:00 a.m. Los Angeles time.
And also here if you want to save our new time zone and actually change our data frame we have to assign
it to a variable and the.
For example we can assign here our cheap price data frame with Los Angeles Time to the variable to L.A..
So now we have two data frames for our two year data set.
So we have it in L.A. time and also New York time
and now let's assume that we want to concatenate both data frames horizontally and we can do this with
the direct pen us method Comcare.
And we pass the G and the G L.A. data frame.
And the interesting question is now how will the rows and the timestamps be aligned in the concatenated
data frame.
And let's simply have a look here.
So we're safe.
The concatenated data frame and the variable comp and let's have a look at comp so that's actually the
DG dataset coming from the New York data frame.
And here we have the Los Angeles data frame.
And actually it looks like that the arrows match here.
So we have the same prices and volume data and on the left hand side we have actually a daytime index
which is localized to a UTC time.
So panel is actually recognized that the T in New York.
Data frame was localized in New York time and the Los Angeles data frame and Los Angeles time.
And it actually aligns both that frames by simply using here the UTC time.
And you can also check out our new index and we can actually see that it is the UTC time.
And then we can actually add two new columns to our combined data frame.
So one column with New York time and one column with Los Angeles time and we actually convert our daytime
index with the UTC time to the corresponding time zones.
So let's have a look here.
And here we have on the right hand side two new columns New York time and Los Angeles time.
And finally you might ask yourself where to get here the time zones that you have to pass here and therefore
we have to impart to the pilot he said module and we can actually get all available time zones with
the the attribute all time zones and we can check the length.
So in total we are 592 time zones and we can also get to the most common time zones with the attribute
common time zones so here we have quite a few times zones so let's scroll down here and here we can
see a U.S. time zone.
So U.S. Eastern U.S. Central and so on and finally we can also see a UTC that where the videos on time
zones that probably are not one of the most attractive topics but the pretty important nevertheless.
So thanks for watching and see us on the next video by.